﻿<?xml version="1.0"?>
<xs:schema xmlns:tns="http://schemas.jelle.druyts.net/BuildCop" elementFormDefault="qualified" targetNamespace="http://schemas.jelle.druyts.net/BuildCop" xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<xs:element name="buildCopConfiguration" type="tns:JelleDruyts.BuildCop.Configuration.BuildCopConfigurationCT" />
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.BuildCopConfigurationCT">
		<xs:sequence>
			<xs:element minOccurs="1" name="buildGroups" type="tns:JelleDruyts.BuildCop.Configuration.BuildGroupCollectionCT">
				<xs:annotation>
					<xs:documentation>The build groups.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element minOccurs="0" name="sharedRules" type="tns:JelleDruyts.BuildCop.Configuration.RuleCollectionCT">
				<xs:annotation>
					<xs:documentation>The shared rules.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element minOccurs="1" name="formatters" type="tns:JelleDruyts.BuildCop.Configuration.FormatterCollectionCT">
				<xs:annotation>
					<xs:documentation>The formatters.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element minOccurs="0" name="outputTypeMappings" type="tns:JelleDruyts.BuildCop.Configuration.OutputTypeCollectionCT">
				<xs:annotation>
					<xs:documentation>The output type mappings.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.BuildGroupElementCT">
		<xs:sequence>
			<xs:element minOccurs="1" name="buildFiles" type="tns:JelleDruyts.BuildCop.Configuration.BuildFilesElementCT">
				<xs:annotation>
					<xs:documentation>The build files in this build group.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element minOccurs="1" name="rules" type="tns:JelleDruyts.BuildCop.Configuration.RuleCollectionCT">
				<xs:annotation>
					<xs:documentation>The rules in this build group.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="name" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of this build group.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="enabled" use="optional" type="xs:boolean">
			<xs:annotation>
				<xs:documentation>A value that determines if this build group is enabled.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.BuildGroupCollectionCT">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="buildGroup" type="tns:JelleDruyts.BuildCop.Configuration.BuildGroupElementCT">
				<xs:annotation>
					<xs:documentation>Defines a build group.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.FormatterCollectionCT">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="formatter" type="tns:JelleDruyts.BuildCop.Configuration.FormatterElementCT">
				<xs:annotation>
					<xs:documentation>Defines a formatter for a BuildCop report.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.FormatterElementCT">
		<xs:sequence>
			<xs:any minOccurs="0" processContents="lax" />
		</xs:sequence>
		<xs:attribute name="name" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of this formatter.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="type" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The type of this formatter.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="minimumLogLevel" use="optional" type="tns:LogLevel">
			<xs:annotation>
				<xs:documentation>The minimum log level this formatter should display.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.RuleCollectionCT">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="rule" type="tns:JelleDruyts.BuildCop.Configuration.RuleElementCT">
				<xs:annotation>
					<xs:documentation>Defines a rule.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.OutputTypeCollectionCT">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="outputType" type="tns:JelleDruyts.BuildCop.Configuration.OutputTypeElementCT">
				<xs:annotation>
					<xs:documentation>Defines an output type alias for a project type GUID.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.OutputTypeElementCT">
		<xs:sequence>
		</xs:sequence>
		<xs:attribute name="alias" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The alias of this output type.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="projectTypeGuid" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The project type GUID of this output type alias.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.RuleElementCT">
		<xs:sequence>
			<xs:any minOccurs="0" processContents="lax" />
		</xs:sequence>
		<xs:attribute name="name" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of this rule.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="type" use="optional" type="xs:string">
			<xs:annotation>
				<xs:documentation>The type of this rule.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="excludedFiles" use="optional" type="xs:string">
			<xs:annotation>
				<xs:documentation>The string to find in the names of files to exclude for this rule.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="excludedOutputTypes" use="optional" type="xs:string">
			<xs:annotation>
				<xs:documentation>The string to find in the output type of files to exclude for this rule.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="enabled" use="optional" type="xs:boolean">
			<xs:annotation>
				<xs:documentation>A value that determines if this rule is enabled.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.BuildFilesElementCT">
		<xs:sequence>
			<xs:element minOccurs="1" name="paths" type="tns:JelleDruyts.BuildCop.Configuration.BuildFilePathCollectionCT">
				<xs:annotation>
					<xs:documentation>The paths to the build files to be processed.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="excludedFiles" use="optional" type="xs:string">
			<xs:annotation>
				<xs:documentation>The string to find in the names of files to exclude in the given root path.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.BuildFilePathCollectionCT">
		<xs:sequence>
			<xs:element minOccurs="0" maxOccurs="unbounded" name="path" type="tns:JelleDruyts.BuildCop.Configuration.BuildFilePathElementCT">
				<xs:annotation>
					<xs:documentation>Defines a build file path.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="JelleDruyts.BuildCop.Configuration.BuildFilePathElementCT">
		<xs:sequence>
		</xs:sequence>
		<xs:attribute name="rootPath" use="required" type="xs:string">
			<xs:annotation>
				<xs:documentation>The root path to look for build files.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="searchPattern" use="optional" type="xs:string">
			<xs:annotation>
				<xs:documentation>The search string to match against the names of files to include in the given root path.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="excludedFiles" use="optional" type="xs:string">
			<xs:annotation>
				<xs:documentation>The string to find in the names of files to exclude in the given root path.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="LogLevel">
		<xs:annotation>
			<xs:documentation>Specifies log levels for log entries.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="Information">
				<xs:annotation>
					<xs:documentation>The log entry is considered informational.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Warning">
				<xs:annotation>
					<xs:documentation>The log entry is considered a warning.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Error">
				<xs:annotation>
					<xs:documentation>The log entry is considered an error.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="Exception">
				<xs:annotation>
					<xs:documentation>The log entry is an exception.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restriction>
	</xs:simpleType>
</xs:schema>

